/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.mall.category.web.CategoryAction
   Module Description   :

   Date Created      : 2010/1/20
   Original Author   : feeling.wang
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.mall.category.web;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.struts2.ServletActionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import com.yaodian100.core.common.dao.impl.CommonCriteria;
import com.yaodian100.core.common.entity.SimplePager;
import com.yaodian100.core.common.service.BaseManager;
import com.yaodian100.core.common.utils.ServerValue;
import com.yaodian100.core.common.utils.StringUtils;
import com.yaodian100.ec.category.entity.Category;
import com.yaodian100.ec.category.service.CategoryService;
import com.yaodian100.ec.outlet.entity.Outlet;
import com.yaodian100.ec.outlet.service.OutletService;
import com.yaodian100.ec.search.SearchManager;
import com.yaodian100.ec.shelf.entity.ViewFlagProduct;
import com.yaodian100.ec.shelf.entity.ViewShelfProduct;
import com.yaodian100.ec.shelf.service.ShelfService;
import com.yaodian100.mall.member.util.UserData;

/**
 * @author feeling.wang
 * 
 */
public class CategoryAction extends ActionSupport implements Preparable {
	private static final String CATEGORY_ID_STRING_BRAND = "11";
	private static final long CATEGORY_ID_BRAND = Long.parseLong(CATEGORY_ID_STRING_BRAND);
	/** logger */
	private final Logger logger = LoggerFactory.getLogger(CategoryAction.class); // 與 getter, setter
	private static final long serialVersionUID = -7581351295438822201L;
	private CategoryService categoryService;
	private ShelfService shelfService;
	private String z;// 类别代号
	private Category category;
	private List<ViewShelfProduct> viewShelfProducts;
	private List<ViewFlagProduct> viewFlagProducts;
	private int viewShelfProductSize;
	private int viewFlagProductSize;
	private String sortOrderType;
	private String rootId;
	private SimplePager pager;
	private String categoryPath;
	private String tempZId;
	private List<ViewShelfProduct> mpvList;
	private int pageSize = 40;
	/* tiles 參數 */
	private String pageDescription;
	private String pageTitle;
	private String pageKeywords;
	private String pageCategoryId;
	@Resource
	private BaseManager baseMgr;
	@Resource
	private SearchManager searchManager;
	private com.yaodian100.ec.search.SearchResult result1;
	private List results;
	private String tempZ;
	private String pathparam;

	// 品牌折扣馆
	private OutletService outletService;
	private Outlet outlet;
	private long surplusTime;
	private boolean inOutlet;

	@Resource
	private JdbcTemplate jdbcTemplate;
	private String countSql = "select distinct count(*) from EC_VIEW_CATEGORY_PRODUCT a,(select * from "
			+ "(select cat2.product_id, cat2.category_id, cat2.show_seq as s1,"
			+ "cat1.show_seq as s2,rank()over(partition by cat2.product_id "
			+ "order by cat2.show_seq,cat1.show_seq ) as rank  " + "from ec_category_main cat1, ec_product_category cat2 "
			+ "where cat1.category_id = cat2.category_id  " + "and cat1.category_path = cat2.category_path "
			+ "and cat1.is_delete  = 'N'  " + "and (cat1.category_path like ? or cat1.category_id=?)"
			+ "order by cat2.product_id desc) " + "where rank =1) b " + "where a.product_id = b.product_id and "
			+ "substr(a. v_uk,  (InStr(a.v_uk,'_')) +1 ) = b.category_id and "
			+ "(a.category_path like ? or a.category_id=?) " + "and (a.is_delete  = 'N' or a.is_delete = 'Q') "
			+ "order by  a.show_Seq asc,a.product_id desc";

	private String getSql(String orderSql) {
		String sql = "SELECT r1.*,p1.is_sold_out FROM(SELECT RESUL.* ,ROWNUM NUM FROM(" + "SELECT RESU.* from ("
				+ "SELECT RES.*,cs.sort_order from(" + "select distinct a.* from EC_VIEW_CATEGORY_PRODUCT a,(select * from "
				+ "(select cat2.product_id, cat2.category_id, cat2.show_seq as s1,"
				+ "cat1.show_seq as s2,rank()over(partition by cat2.product_id "
				+ "order by cat2.show_seq,cat1.show_seq ) as rank  " + "from ec_category_main cat1, ec_product_category cat2 "
				+ "where cat1.category_id = cat2.category_id  " + "and cat1.category_path = cat2.category_path "
				+ "and cat1.is_delete  = 'N'  " + "and (cat1.category_path like ? or cat1.category_id=?) "
				+ "order by cat2.product_id desc) " + "where rank =1) b " + "where a.product_id = b.product_id and "
				+ "substr(a. v_uk,  (InStr(a.v_uk,'_')) +1 ) = b.category_id and "
				+ "(a.category_path like ? or a.category_id=?) " + "and (a.is_delete  = 'N' or a.is_delete = 'Q') " + ") RES "
				+ "LEFT JOIN EC_PROD_CAT_SE cs "
				+ "ON cs.prod_cat_id=RES.prodcut_category_id and cs.category_id=? and cs.product_id=RES.product_id "
				+ ") RESU " + orderSql + " ) RESUL " + "WHERE ROWNUM<=? " + ")r1,ec_product_main p1 "
				+ "WHERE r1.product_id=p1.product_id and r1.NUM>?";
		return sql;
	}

	private String getOrderSql(String sortOrderType) {
		if (sortOrderType == null || sortOrderType.length() == 0) {
			sortOrderType = "6";
		}
		int tp = Integer.valueOf(sortOrderType);
		String order = "";
		switch (tp) {
		case 0: {
			order = "order by RESU.start_date desc,RESU.product_id desc";
			break;
		}
		case 1: {
			order = "order by RESU.start_date asc,RESU.product_id desc";
			break;
		}
		case 2: {
			order = "order by RESU.shelf_price asc,RESU.product_id desc";
			break;
		}
		case 3: {
			order = "order by RESU.shelf_price desc,RESU.product_id desc";
			break;
		}
		case 4: {
			order = "order by RESU.sold_count desc,RESU.product_id desc";
			break;
		}
		case 5: {
			order = "order by RESU.sold_count asc,RESU.product_id desc";
			break;
		}
		case 6: {
			order = "order by  RESU.sort_order asc, RESU.show_Seq asc,RESU.product_id desc";
			break;
		}
		}
		return order;
	}

	/**
	 * @return the result1
	 */
	public com.yaodian100.ec.search.SearchResult getResult1() {
		return result1;
	}

	/**
	 * @param result1 the result1 to set
	 */
	public void setResult1(com.yaodian100.ec.search.SearchResult result1) {
		this.result1 = result1;
	}

	/**
	 * 用於判斷是否處於特定页面，目前有 categorynav 會用到
	 */
	private boolean inCategoryIndex;
	private boolean inDaphneCategoryIndex;

	/**
	 * index:站首页 mainCategory:馆首页 secondCategory:第二层 thirdCategory:第三层、第四层、第五层、第六层 brand: 品牌旗舰 categoryPath start with 11
	 * 
	 * @return
	 * @throws Exception
	 */
	public String category() throws Exception {
		// load properties
		category = categoryService.get(Long.parseLong(z));

		// 品牌折扣检验
		if (!"7447".equals(z) && category != null && category.getCategoryPath().startsWith("7447")
				&& !this.checkOutletsCampaign()) {
			return "outSale";
		}
		if (category != null && category.getCategoryPath().startsWith("7447")) {
			inOutlet = true;
		}

		HttpServletRequest request = (HttpServletRequest) ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST);
		HttpServletResponse response = (HttpServletResponse) ActionContext.getContext().get(
				ServletActionContext.HTTP_RESPONSE);
		UserData userData = new UserData(request, response);
		if (null == category || category.getIsDelete().equalsIgnoreCase("Y")
				|| category.getIsVisible().equalsIgnoreCase("N")) {
			userData.clear("fromCategory");
			pathparam = ServerValue.getFrontHostname() + ServerValue.getFrontContextPath() + "/index.do?"
					+ request.getQueryString();
			return "index";
		} else if (category.getStartDate().getTime() > new Date().getTime()
				|| category.getEndDate().getTime() < new Date().getTime()) {
			return "notFind";
		} else {
			// 記錄選取的類別館id，並記錄cookie

			userData.clear("fromProduct");
			userData.writeRawValue("fromCategory", category.getCategoryPath().split("/")[0]);
			if (StringUtils.equals("0", category.getLevel())) {
				if (category.getId() < 10) {
					tempZId = "0" + category.getId().toString();
				} else {
					tempZId = category.getId().toString();
				}
				pageTitle = ServerValue.getSeoProp().getProperty(tempZId + ".title");
				pageDescription = ServerValue.getSeoProp().getProperty(tempZId + ".description");
				pageKeywords = ServerValue.getSeoProp().getProperty(tempZId + ".keywords");
				if ("11".equals(tempZId)) {
					return "brand";
				} else if ("7447".equals(tempZId)) {
					return "outlet";
				} else {
					categoryPath = categoryService.makeCategorieURL(category.getId(), false);
					return "mainCategory";
				}
			} else {
				if (Integer.parseInt(category.getCategoryPath().split("/")[0]) < 10) {
					tempZId = "0" + category.getCategoryPath().split("/")[0];
				} else {
					tempZId = category.getCategoryPath().split("/")[0];
				}

				pageDescription = ServerValue.getSeoProp().getProperty(tempZId + ".description");
				pageKeywords = ServerValue.getSeoProp().getProperty(tempZId + ".keywords");

				if ("11".equals(tempZId)) {
					pageTitle = ServerValue.getSeoProp().getProperty(tempZId + ".title");

					// 品牌旗舰下各品牌分類要抓取自己的 title
					if (category.getParentId().equals(CATEGORY_ID_BRAND)) {
						String brandPageTitle = ServerValue.getSeoProp().getProperty(category.getId().toString() + ".title");
						// 如果抓不到品牌分類自己的 title，就改用品牌旗舰title
						if (!StringUtils.isEmpty(brandPageTitle)) {
							pageTitle = brandPageTitle;
						}
					}

					return "brand";
				} else {
					rootId = category.getCategoryPath().split("/")[0];
					categoryPath = categoryService.makeCategorieURL(category.getId(), false);
					// 新版不重複用tag
					String categaryStr = "";
					String sortStr = "";

					CommonCriteria criteria = new CommonCriteria();
					criteria.addEq("isDelete", "N");
					if ("N".equalsIgnoreCase(category.getIsEndnode())) {
						criteria.addRlike("categoryPath", category.getCategoryPath());
						categaryStr = "%" + category.getCategoryPath() + "%";
					} else {
						criteria.addEq("categoryPath", category.getCategoryPath());
						categaryStr = category.getCategoryPath();
					}
					tempZ = "/" + z + "/";
					categoryAll();
				}
				return "thirdCategory";
			}
		}
	}

	/**
	 * 检核品牌折扣馆活动是否正确
	 * 
	 * @param categoryId
	 * @return true:正确,false:不正确
	 */
	public boolean checkOutletsCampaign() {
		// 取得品牌折扣館(7447)的下一層
		String categoryPath = category.getCategoryPath();
		String brandCategoryId;
		int location = categoryPath.indexOf("/");
		if (location == -1) {
			return false;
		} else {
			String[] tmpCategoryId = org.apache.commons.lang.StringUtils.split(categoryPath, "/");
			if (tmpCategoryId.length > 1) {
				brandCategoryId = tmpCategoryId[1];
			} else {
				return false;
			}
		}

		CommonCriteria cri = new CommonCriteria();
		cri.addEq("brandCategoryId", Long.parseLong(brandCategoryId));
		Date now = new Date();
		cri.addLe("startDate", now);
		cri.addGe("endDate", now);
		List<Outlet> outletList = outletService.getList(0, -1, cri, null);

		if (outletList == null || outletList.size() == 0) {
			return false;
		}

		Outlet outletObj = outletList.get(0);
		this.setOutlet(outletObj);
		surplusTime = outletObj.getEndDate().getTime() - now.getTime();

		return true;
	}

	private String pIndex;

	/**
	 * @return the pIndex
	 */
	public String getpIndex() {
		return pIndex;
	}

	/**
	 * @param pIndex the pIndex to set
	 */
	public void setpIndex(String pIndex) {
		this.pIndex = pIndex;
	}

	/**
	 * 館首頁、第二層看全部商品
	 * 
	 * @return
	 * @throws Exception
	 */
	public String categoryAll() throws Exception {
		boolean lookAll = false;
		if (tempZ == null) {
			lookAll = true;
			tempZ = z + "/";
		}
		if (z == null || z.length() == 0) {
			return "allCategory";
		}
		if (pager == null) {
			pIndex = "0";
		} else {
			pIndex = String.valueOf(pager.getCurrentPage());
		}
		Category category = (Category) baseMgr.get(Category.class, Long.valueOf(z));
		// for google adv
		if (StringUtils.equals("0", category.getLevel())) {
			if (category.getId() < 10) {
				tempZId = "0" + category.getId().toString();
			} else {
				tempZId = category.getId().toString();
			}

			pageTitle = ServerValue.getSeoProp().getProperty(tempZId + ".title");
			pageDescription = ServerValue.getSeoProp().getProperty(tempZId + ".description");
			pageKeywords = ServerValue.getSeoProp().getProperty(tempZId + ".keywords");
		} else {
			if (Integer.parseInt(category.getCategoryPath().split("/")[0]) < 10) {
				tempZId = "0" + category.getCategoryPath().split("/")[0];
			} else {
				tempZId = category.getCategoryPath().split("/")[0];
			}
		}
		// end for google adv
		this.category = category;
		int totalCount = 0;
		if (lookAll) {
			totalCount = jdbcTemplate.queryForInt(countSql, tempZ + "%", z, tempZ + "%", z);
		} else {
			totalCount = jdbcTemplate.queryForInt(countSql, "%" + tempZ + "%", z, "%" + tempZ + "%", z);
		}

		int maxPage = 0;

		if (totalCount > 0) {
			maxPage = totalCount / pageSize;
			if (totalCount % pageSize > 0) {
				maxPage++;
			}
		}
		int startRow = 0;
		int endRow = 0;
		if (Integer.valueOf(pIndex) < maxPage) {
			startRow = pageSize * Integer.valueOf(pIndex);
			endRow = pageSize * (Integer.valueOf(pIndex) + 1);
		} else {
			startRow = pageSize * maxPage;
			endRow = totalCount;
		}
		if (getPager() == null) {
			setPager(new SimplePager(2));
		}
		getPager().setPageRecord(pageSize);
		getPager().setTotalSize(totalCount);
		String sql = getSql(getOrderSql(sortOrderType));
		if (lookAll) {
			results = jdbcTemplate.queryForList(sql, tempZ + "%", z, tempZ + "%", z, z, endRow, startRow);
		} else {
			results = jdbcTemplate.queryForList(sql, "%" + tempZ + "%", z, "%" + tempZ + "%", z, z, endRow, startRow);
		}
		return "allCategory";
		/*
		 * if (z == null || z.length() == 0) { return "allCategory"; } if (pager == null) { pIndex = "0"; } else {
		 * 
		 * pIndex = String.valueOf(pager.getCurrentPage());
		 * 
		 * } Category category = (Category) baseMgr.get(Category.class, Long.valueOf(z)); this.category = category; String
		 * categoryL1 = null; String categoryL2 = null; String categoryL3 = null; String categoryLX = null; String
		 * categoryPath = category.getCategoryPath(); String[] categoryIds = categoryPath.split("/"); if (categoryIds.length
		 * > 0) { categoryL1 = categoryIds[0]; } if (categoryIds.length > 1) { categoryL2 = categoryIds[1]; } if
		 * (categoryIds.length > 2) { categoryL3 = categoryIds[2]; } if (categoryIds.length > 3) { categoryLX =
		 * categoryIds[categoryIds.length - 1]; } String categoryBlock = ""; if ((categoryL1 != null && categoryL1.length()
		 * > 0 && !categoryL1.equals("0")) || (categoryL2 != null && categoryL2.length() > 0) || (categoryL3 != null &&
		 * categoryL3.length() > 0)) { String theCategoryL = ""; String categoryLName = ""; if (categoryLX != null &&
		 * categoryLX.length() > 0) { theCategoryL = categoryLX; categoryLName = "CATEGORY_LX"; } else if (categoryL3 !=
		 * null && categoryL3.length() > 0) { theCategoryL = categoryL3; categoryLName = "CATEGORY_L3"; } else if
		 * (categoryL2 != null && categoryL2.length() > 0) { theCategoryL = categoryL2; categoryLName = "CATEGORY_L2"; }
		 * else if (categoryL1 != null && categoryL1.length() > 0) { theCategoryL = categoryL1; categoryLName =
		 * "CATEGORY_L1"; } categoryBlock = "{\"QCompC1\":{\"QC1\":{\"QT\":0,\"Operand1\":\"" + theCategoryL +
		 * "\",\"QueryFieldNames\":[\"" + categoryLName + "\"]}}}"; } String sotStr =
		 * "{\"OrderByMetaField\":\"SHELF_START_DATE\",\"OrderDirection\":1}"; result1 = searchManager.query(-1, "", "", "",
		 * Integer.parseInt(pIndex), pageSize, categoryBlock, sotStr, "", "", "", "", false); if (getPager() == null) {
		 * setPager(new SimplePager(2)); } getPager().setPageRecord(pageSize); getPager().setTotalSize(result1.getTotal());
		 * return "allCategory";
		 */
	}

	/**
	 * 全部类别頁
	 * 
	 * @return
	 */
	public String categoryindex() {
		return "categoryindex";
	}

	/**
	 * 达芙妮门店取货专区
	 * 
	 * @return
	 */
	public String daphne() {
		setInDaphneCategoryIndex(true);
		return "daphne_categoryindex";
	}

	public String categoryindexv2() {
		setInCategoryIndex(true);
		return "categoryindex";
	}

	public Category getCategory() {
		return category;
	}

	public String getCategoryPath() {
		return categoryPath;
	}

	public String getPageCategoryId() {
		return pageCategoryId;
	}

	public String getPageDescription() {
		return pageDescription;
	}

	public String getPageKeywords() {
		return pageKeywords;
	}

	public SimplePager getPager() {
		return pager;
	}

	public String getPageTitle() {
		return pageTitle;
	}

	public String getRootId() {
		return rootId;
	}

	public ShelfService getShelfService() {
		return shelfService;
	}

	public String getTempZId() {
		return tempZId;
	}

	public List<ViewFlagProduct> getViewFlagProducts() {
		return viewFlagProducts;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.opensymphony.xwork2.Preparable#prepare()
	 */

	public int getViewFlagProductSize() {
		return viewFlagProductSize;
	}

	public List<ViewShelfProduct> getViewShelfProducts() {
		return viewShelfProducts;
	}

	public int getViewShelfProductSize() {
		return viewShelfProductSize;
	}

	public String getZ() {
		return z;
	}

	public String getImageDomain() {
		return ServerValue.getImgDomain();
	}

	/**
	 * 用於判斷是否處於首頁，目前有 categorynav 會用到
	 */
	public boolean isInCategoryIndex() {
		return this.inCategoryIndex;
	}

	// 瀏覽記碌
	public void checkMpv() throws Exception {
		HttpServletRequest request = (HttpServletRequest) ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST);
		HttpServletResponse response = (HttpServletResponse) ActionContext.getContext().get(
				ServletActionContext.HTTP_RESPONSE);
		UserData userData = new UserData(request, response);
		String mpv = userData.readValue(UserData.NAME_YAODIAN100_MEMBER_PV);
		if (StringUtils.isNotBlank(mpv)) {
			String[] mpvs = StringUtils.split(mpv, ",");
			mpvList = new ArrayList<ViewShelfProduct>();
			List<ViewShelfProduct> vsps = null;
			CommonCriteria crit = null;
			ArrayUtils.reverse(mpvs);
			for (String pv : mpvs) {
				crit = new CommonCriteria();
				crit.addEq("productId", pv);
				crit.addEq("isDelete", "N");
				vsps = shelfService.getViewShelfProduct(crit, null, 0, 1);
				if (null != vsps && vsps.size() == 1) {
					mpvList.add(vsps.get(0));
				}
			}
			if (mpvList.size() > 10) {
				mpvList = mpvList.subList(0, 10);
				userData.writeValue(UserData.NAME_YAODIAN100_MEMBER_PV, (ArrayUtils.toString(ArrayUtils.subarray(mpvs,
						mpvs.length - 10, mpvs.length))).replaceAll("{", "").replaceAll("}", ""));
			}
		} else {
			mpvList = null;
		}

	}

	public void prepare() throws Exception {
		checkMpv();
		if (null == pager) {
			pager = new SimplePager(2);
		}
		pager.setPageRecord(pageSize);
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public void setCategoryPath(String categoryPath) {
		this.categoryPath = categoryPath;
	}

	public void setCategoryService(CategoryService categoryService) {
		this.categoryService = categoryService;
	}

	public void setPageCategoryId(String pageCategoryId) {
		this.pageCategoryId = pageCategoryId;
	}

	public void setPageDescription(String pageDescription) {
		this.pageDescription = pageDescription;
	}

	public void setPageKeywords(String pageKeywords) {
		this.pageKeywords = pageKeywords;
	}

	public void setPager(SimplePager pager) {
		this.pager = pager;
	}

	public void setPageTitle(String pageTitle) {
		this.pageTitle = pageTitle;
	}

	public void setRootId(String rootId) {
		this.rootId = rootId;
	}

	public void setShelfService(ShelfService shelfService) {
		this.shelfService = shelfService;
	}

	public void setTempZId(String tempZId) {
		this.tempZId = tempZId;
	}

	public void setViewFlagProducts(List<ViewFlagProduct> viewFlagProducts) {
		this.viewFlagProducts = viewFlagProducts;
	}

	public void setViewFlagProductSize(int viewFlagProductSize) {
		this.viewFlagProductSize = viewFlagProductSize;
	}

	public void setViewShelfProducts(List<ViewShelfProduct> viewShelfProducts) {
		this.viewShelfProducts = viewShelfProducts;
	}

	public void setViewShelfProductSize(int viewShelfProductSize) {
		this.viewShelfProductSize = viewShelfProductSize;
	}

	public void setZ(String z) {
		if (NumberUtils.isNumber(z)) {
			this.z = z;
		} else {
			this.z = StringUtils.parseNumber(z);
		}
	}

	/**
	 * 宣告為 private，不讓外面更動到處屬性
	 */
	private void setInCategoryIndex(boolean inCategoryIndex) {
		this.inCategoryIndex = inCategoryIndex;
	}

	/**
	 * @return the results
	 */
	public List getResults() {
		return results;
	}

	/**
	 * @param results the results to set
	 */
	public void setResults(List results) {
		this.results = results;
	}

	/**
	 * @return the sortOrderType
	 */
	public String getSortOrderType() {
		return sortOrderType;
	}

	/**
	 * @param sortOrderType the sortOrderType to set
	 */
	public void setSortOrderType(String sortOrderType) {
		this.sortOrderType = sortOrderType;
	}

	/**
	 * @return the pageSize
	 */
	public int getPageSize() {
		return pageSize;
	}

	/**
	 * @param pageSize the pageSize to set
	 */
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public boolean isInDaphneCategoryIndex() {
		return inDaphneCategoryIndex;
	}

	public void setInDaphneCategoryIndex(boolean inDaphneCategoryIndex) {
		this.inDaphneCategoryIndex = inDaphneCategoryIndex;
	}

	public String getPathparam() {
		return pathparam;
	}

	// 品牌折扣馆 getter & setter
	public OutletService getOutletService() {
		return outletService;
	}

	public void setOutletService(OutletService outletService) {
		this.outletService = outletService;
	}

	public Outlet getOutlet() {
		return outlet;
	}

	public void setOutlet(Outlet outlet) {
		this.outlet = outlet;
	}

	public long getSurplusTime() {
		return surplusTime;
	}

	public void setSurplusTime(long surplusTime) {
		this.surplusTime = surplusTime;
	}

	public boolean isInOutlet() {
		return inOutlet;
	}

	public void setInOutlet(boolean inOutlet) {
		this.inOutlet = inOutlet;
	}

	public List<ViewShelfProduct> getMpvList() {
		return mpvList;
	}

	public void setMpvList(List<ViewShelfProduct> mpvList) {
		this.mpvList = mpvList;
	}

}